home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: ave@ix.netcom.com(Alexander Berdichevsky )
- Newsgroups: comp.lang.c++
- Subject: Re: How can I include IOSTREAM.H only once?
- Date: 28 Feb 1996 13:13:44 GMT
- Organization: Netcom
- Message-ID: <4h1ke8$qgc@cloner2.ix.netcom.com>
- References: <4gre90$oei@service.polymtl.ca>
- NNTP-Posting-Host: ix-prn1-07.ix.netcom.com
- X-NETCOM-Date: Wed Feb 28 5:13:44 AM PST 1996
-
- In <4gre90$oei@service.polymtl.ca> bluefox@info.polymtl.ca (Michael
- Gaudette) writes:
- >
- >I am presently engaged in what is usually called "the learning
- process",
- >and I've been programming simple programs with classes. Because of
- this,
- >I have had to #include <iostream.h> in most of my "class.cpp" files
- AND
- >in my main program. This (added to conio.h and all the other standard
- >libraries) usually result in a simple program being 20000 lines long.
- >Is there any way (using Borland v4.5) to make the compiler only link
- >those files ONCE?
- >
- >Thanks in advance for any help I may receive
-
- If you review iostream.h consider this:
-
- #ifndef _H_IOSTREAM
- #define _H_IOSTREAM
- ...
- iostream.h lines
- ....
- #endif
-
- You may use this technic for your own header files.
-
- Regards
-
- Alex
-